# $Id: PKGBUILD 156470 2012-04-18 17:42:37Z daniel $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
pkgname=gnome-keyring-sharp
pkgver=1.0.2
pkgrel=4
pkgdesc="A fully managed implementation of libgnome-keyring"
arch=('i686' 'x86_64')
url="http://www.mono-project.com/Libraries"
license=('custom')
depends=('libgnome-keyring' 'gtk-sharp-2')
source=(http://www.go-mono.com/archive/${pkgname}/${pkgname}-${pkgver}.tar.gz)
options=('!makeflags' '!libtool')
md5sums=('f9a48319f3fe6123017b000d714d68b1')

build() {
  export MONO_SHARED_DIR="${srcdir}/.wapi"
  mkdir -p "${MONO_SHARED_DIR}"

  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure --prefix=/usr --sysconfdir=/etc --disable-static
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make DESTDIR="${pkgdir}" install
  rm -rf "${MONO_SHARED_DIR}"
  ln -sf gnome-keyring-sharp-1.0.pc "${pkgdir}/usr/lib/pkgconfig/gnome-keyring-sharp.pc"
  install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/license
}
